<include file="Public/siteTopbar" />
<script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
<script src="__STATIC__/js/slider.js"></script>
<include file="Public/header" />



<div class="container usercenter" >
    
    <include file="User/menu" />
   <div class="col-sm-9">
        <div class="page-title">
                <h1>My Orders</h1>
            </div>
      
        <div class="xgzl-w">
        
        <table class="data-table" id="my-orders-table">
    <colgroup><col width="1">
    <col width="1">
    <col>
    <col width="1">
    <col width="1">
    <col width="1">
    </colgroup><thead>
        <tr class="first last">
            <th>Order #</th>
            <th>Date</th>
            <th>Ship To</th>
            <th><span class="nobr">Order Total</span></th>
            <th><span class="nobr">Order Status</span></th>
            <th>&nbsp;</th>
        </tr>
    </thead>
    <tbody>
     <volist name="lists" id="list">
        <tr class="first odd" >
            <td>{$list.order_sn}</td>
            <td><span class="nobr">{$list.add_time|date='m/d/Y',###}</span></td>
            <td>{$list.consignee}</td>
            <td><span class="price">{$list['currency']|get_money_str}{$list['order_amount']}</span></td>
            <td><em>{$list['order_status_desc']}</em></td>
            <td class="a-center last">
            
            	<if condition="$list.cancel_btn eq 1">
                	<span class="nobr"><a onClick="cancel_order({$list.order_id})">Cancel</a> | 
                </if>
            	<if condition="$list.pay_btn eq 1">
                	<span class="nobr"><a href="{:U('/Home/Cart/cart4',array('order_id'=>$list[order_id]))}">Pay</a> | 
                </if>
                
                
                 <if condition="$list.receive_btn eq 1">
                 <span class="nobr"><a onClick=" if(confirm('Are you sure you have received it?')) location.href='{:U('Home/User/order_confirm',array('id'=>$list['order_id']))}'">Receipt</a> | 
                 </if>
                                        
                                        
                 <if condition="$list.returnmoney_btn eq 1 and $list.return_order neq 1">
                  <!-- <span class="nobr"><a onClick=" if(confirm('Are you sure you want to apply for a refund?')) location.href='{:U('Home/User/return_order',array('order_id'=>$list['order_id']))}'">Refund</a> |  -->
                  </if>
                  
                  
                <span class="nobr"><a href="{:U('Home/User/order_detail',array('id'=>$list['order_id']))}" >View Order</a>
                                                        </span>
            </td>
        </tr>
        
        </volist>
            
            </tbody>
</table>



         
            <div class="merge">
                {$page}
            </div>
        </div>
    </div>
</div>
<div class="he80"></div>


<!--------footer-开始-------------->
<include file="Public/footer" />
<!--------footer-结束-------------->


</body>
<script>
    /*$(function () {
     $("#h-s").click(function () {
     $('.ec-ta-x').css('left','124px');
     $('.ec-ta-x').css('width','110px');
     $(this).addClass("cullent");
     $('#q-s').removeClass("cullent");
     });
     });
     */
</script>

<script>
    $(function () {
        //高亮显示
        var active = '{$active_status}';
        if(!active)
            active = 'ALL';
        $('.wddd-li li').removeClass('wddd-red');
        $('#'+active).addClass('wddd-red');

        $("#h-s").mouseover(function () {
            $('.ec-ta-x').css('left','124px');
            $('.ec-ta-x').css('width','110px');
            $(this).addClass("cullent");
        });
        $("#h-s").mouseout(function () {
            $('.ec-ta-x').css('left','0px');
            $('.ec-ta-x').css('width','124px');
            $(this).removeClass("cullent");
        });
    });
    $(function () {
        $("#q-s").mouseover(function () {
            $('.ec-ta-x').css('left','0px');
            $(this).addClass("cullent");
        });
        $("#q-s").mouseout(function () {
            $('.ec-ta-x').css('left','0px');
        });
    });
    //取消订单
    function cancel_order(id){
        if(!confirm("OK to cancel the order?"))
            return false;
        location.href = "/index.php?m=Home&c=User&a=cancel_order&id="+id;
    }
</script>
</html>